﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BookFind.aspx.cs" Inherits="BookFind" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            font-size: x-large;
        }
        .auto-style2 {
            font-size: xx-large;
        }
    </style>
</head>
<body style="background-image: url('/Images/background.jpg')">
    <form id="form1" runat="server">
        <center>
    <div style="background-color: #CCFFCC; background-image: url('/Images/background.jpg');">
    
        <br />
        <span class="auto-style2">按书籍ID查询<br />
        </span>
    
        <br />
        <br />
        <span class="auto-style1">请输入书籍ID</span>:<asp:TextBox ID="txtSearch" runat="server" Height="24px" Width="211px"></asp:TextBox>
        &nbsp;&nbsp;
        &nbsp;
        <br />
        <br />
        <br />
        <asp:GridView ID="gvResult" runat="server" AutoGenerateColumns="False" DataKeyNames="Book_Id" DataSourceID="sdsSearch" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                <asp:BoundField DataField="Book_Id" HeaderText="书号" ReadOnly="True" SortExpression="Book_Id" />
                <asp:BoundField DataField="Book_Name" HeaderText="书名" SortExpression="Book_Name" />
                <asp:BoundField DataField="Book_Class_Id" HeaderText="分类号" SortExpression="Book_Class_Id" />
                <asp:BoundField DataField="Book_Author" HeaderText="作者" SortExpression="Book_Author" />
                <asp:BoundField DataField="Book_Press" HeaderText="出版社" SortExpression="Book_Press" />
                <asp:BoundField DataField="Book_Price" HeaderText="价格" SortExpression="Book_Price" />
                <asp:BoundField DataField="Book_Number" HeaderText="总量" SortExpression="Book_Number" />
                <asp:BoundField DataField="Book_RestNumber" HeaderText="剩余数量" SortExpression="Book_RestNumber" />
                <asp:BoundField DataField="Book_Date" HeaderText="上架日期" SortExpression="Book_Date" />
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#007DBB" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
        <br />
        <asp:Button ID="btnSearch" runat="server" Text="查找" style="font-size: large" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnReturn" runat="server" OnClick="btnReturn_Click" Text="返回" style="font-size: large" />
        <br />
        <br />
        <asp:Label ID="lblMsg" runat="server"></asp:Label>
        <asp:SqlDataSource ID="sdsSearch" runat="server" ConnectionString="<%$ ConnectionStrings:BookShopConnectionString %>" OldValuesParameterFormatString="original_{0}" OnSelected="sdsSearch_Selected" SelectCommand="SELECT * FROM [BookInfo] WHERE ([Book_Name] = @Book_Name)">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtSearch" Name="Book_Name" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    
        <br />
    
    </div>
            </center>
    </form>
</body>
</html>
